package ar.com.fiuba.ElectronicCircuitAnalyst.application.api.dto;


/**
 * Data transfer object for a connection end. It holds:
 * 
 * @param name
 *            the name of the component of this end.
 * 
 * @param input
 *            /output whether if it is the input or the output of the circuit
 *            element.
 * 
 * @param index
 *            the index of the input/output.
 * 
 */
public class LeadDto {

	private String name;

	private LeadType type;

	private Integer index;

	public LeadDto() {

	}

	public LeadDto(String name, LeadType type, Integer index) {
		this.name = name;
		this.type = type;
		this.index = index;
	}

	public LeadType getType() {
		return type;
	}

	public void setType(LeadType type) {
		this.type = type;
	}

	public void setType(String type) {
		this.type = LeadType.valueOf(type.toUpperCase());
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getIndex() {
		return index;
	}

	public void setIndex(Integer index) {
		this.index = index;
	}

}
